'use strict'

module.exports = {
	up: async (queryInterface, Sequelize) => {
		const { INTEGER, DATE, STRING } = Sequelize
		await queryInterface.createTable('users', {
			id: { type: INTEGER, primaryKey: true, autoIncrement: true },
			_username: STRING(30),
			_password: STRING(30),
			_status: {
				type: INTEGER,
				defaultValue: 1,
			},
			invitation_code: STRING(12),
			created_at: DATE,
			updated_at: DATE,
		})
	},
	down: async queryInterface => {
		await queryInterface.dropTable('users')
	},
}
